<?php

function unubb(&$info)
{
$zd="abcdefghijklmnopqrstuvwxyz";
		for($ii=10;$ii<26;$ii++)
		{
		$uu=substr($zd,$ii,1);		
		$info['b'.$uu]=html_entity_decode($info['b'.$uu]);
		}
		$info['content']=html_entity_decode($info['content']);
}

function unvalue($tmp,$table,$con,$zd)
{global $ttt;
  $temp=Tra($tmp,$table,$con);
  
 		$sortinfo=Dga('infosort',"id = '".$temp[sortid]."'");
		$zd=explode('#',$zd);
		$num=count($zd);
		for($i=0;$i<$num;$i++)
		{
		$a=unserialize($sortinfo[$zd[$i]]);
		$a= explode('#',$a[value]);
				foreach($a as $vlue)
				{
					$bs=explode('-',$vlue);
					if($temp[$zd[$i]]==$bs[0])
					{
					$temp[$zd[$i]]=$bs[1];
					}
				}	
		}
	$ttt->assign($tmp,$temp);
	return $temp;
}
function unvar($sortid,$zd,$zz){
 		$sortinfo=Dga('infosort',"id = '".$sortid."'");

		$a=unserialize($sortinfo[$zd]);
		$a= explode('#',$a[value]);
				foreach($a as $vlue)
				{
					$bs=explode('-',$vlue);
					if($zz==$bs[0])
					{
					return $bs[1];
					}
				}	
}
function uncheckbox($sortid,$zd,$zz){
$allzd=explode('#',$zz);
$zz=array();
	foreach($allzd as $value){
		$temp=unvar($sortid,$zd,$value);
		$zz[]=$temp;
	}
return $zz;
}


?>